package com.gxa.p2p.pojo;

import java.io.Serializable;
import java.util.Date;

/**
 * 描述投标的实体类
 */
public class Bid implements Serializable {

    private static final long serialVersionUID = -211614656718640003L;
    private Integer id;
    // 投标用户ID
    private Integer userId;
    /**
     * 实际年利率(应该是等同于标的的利率)
     */
    private Double actualRate;
    /**
     * 投标有效金额(就是投标金额)
     */
    private Double availableAmount;
    /**
     * 来自于哪个借款标
     */
    private Integer bidRequestId;
    /**
     * 标的名称（冗余数据）
     */
    private String bidRequestTitle;
    /**
     * 投标人
     */
    private String bidUser;
    /**
     * 投标时间
     */
    private Date bidTime;
    /**
     * 标的状态，应该和标的状态同步
     */
    private Integer bidRequestState;

    /**
     * 构造查询条件
     */
    public Bid(Integer id,Double actualRate,Double availableAmount,Integer bidRequestId,String bidRequesTitle,String bidUser,Date bidTime,Integer bidRequestState) {
        this.id = id;
        this.actualRate = actualRate;
        this.availableAmount = availableAmount;
        this.bidRequestId = bidRequestId;
        this.bidRequestTitle = bidRequesTitle;
        this.bidUser = bidUser;
        this.bidTime = bidTime;
        this.bidRequestState = bidRequestState;
    }

    /**
     * 构造查询条件
     */
    public Bid() {
        super();
    }

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    /**
     * 获取 bid.id
     * @return bid.id
     */
    public Integer getId() {
        return id;
    }

    /**
     * 设置 bid.id
     * @param id bid.id
     */
    public void setId(Integer id) {
        this.id = id;
    }

    /**
     * 获取 实际年利率(应该是等同于标的的利率) bid.actual_rate
     * @return 实际年利率(应该是等同于标的的利率)
     */
    public Double getActualRate() {
        return actualRate;
    }

    /**
     * 设置 实际年利率(应该是等同于标的的利率) bid.actual_rate
     * @param actualRate 实际年利率(应该是等同于标的的利率)
     */
    public void setActualRate(Double actualRate) {
        this.actualRate = actualRate;
    }

    /**
     * 获取 投标有效金额(就是投标金额) bid.available_amount
     * @return 投标有效金额(就是投标金额)
     */
    public Double getAvailableAmount() {
        return availableAmount;
    }

    /**
     * 设置 投标有效金额(就是投标金额) bid.available_amount
     * @param availableAmount 投标有效金额(就是投标金额)
     */
    public void setAvailableAmount(Double availableAmount) {
        this.availableAmount = availableAmount;
    }

    /**
     * 获取 来自于哪个借款标 bid.bid_request_id
     * @return 来自于哪个借款标
     */
    public Integer getBidRequestId() {
        return bidRequestId;
    }

    /**
     * 设置 来自于哪个借款标 bid.bid_request_id
     * @param bidRequestId 来自于哪个借款标
     */
    public void setBidRequestId(Integer bidRequestId) {
        this.bidRequestId = bidRequestId;
    }

    /**
     * 获取 标的名称（冗余数据） bid.bid_reques_title
     * @return 标的名称（冗余数据）
     */
    public String getBidRequestTitle() {
        return bidRequestTitle;
    }

    /**
     * 设置 标的名称（冗余数据） bid.bid_reques_title
     * @param bidRequestTitle 标的名称（冗余数据）
     */
    public void setBidRequestTitle(String bidRequestTitle) {
        this.bidRequestTitle = bidRequestTitle == null ? null : bidRequestTitle.trim();
    }

    /**
     * 获取 投标人 bid.bid_user
     * @return 投标人
     */
    public String getBidUser() {
        return bidUser;
    }

    /**
     * 设置 投标人 bid.bid_user
     * @param bidUser 投标人
     */
    public void setBidUser(String bidUser) {
        this.bidUser = bidUser == null ? null : bidUser.trim();
    }

    /**
     * 获取 投标时间 bid.bid_time
     * @return 投标时间
     */
    public Date getBidTime() {
        return bidTime;
    }

    /**
     * 设置 投标时间 bid.bid_time
     * @param bidTime 投标时间
     */
    public void setBidTime(Date bidTime) {
        this.bidTime = bidTime;
    }

    /**
     * 获取 标的状态，应该和标的状态同步 bid.bid_request_state
     * @return 标的状态，应该和标的状态同步
     */
    public Integer getBidRequestState() {
        return bidRequestState;
    }

    /**
     * 设置 标的状态，应该和标的状态同步 bid.bid_request_state
     * @param bidRequestState 标的状态，应该和标的状态同步
     */
    public void setBidRequestState(Integer bidRequestState) {
        this.bidRequestState = bidRequestState;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append(", id=").append(id);
        sb.append(", actualRate=").append(actualRate);
        sb.append(", availableAmount=").append(availableAmount);
        sb.append(", bidRequestId=").append(bidRequestId);
        sb.append(", bidRequestTitle=").append(bidRequestTitle);
        sb.append(", bidUser=").append(bidUser);
        sb.append(", bidTime=").append(bidTime);
        sb.append(", bidRequestState=").append(bidRequestState);
        sb.append("]");
        return sb.toString();
    }
}